<?php

/**
*
* @author  :  Dennis T Kaplan
*             URL: http://linux.PzzAzz.net
*        
* @version :  1.0
* Date     :  June 17, 2007
* Function : reverse strstr()
* Purpose  : Returns part of haystack string from start to the first occurrence of needle
* $haystack = 'this/that/whatever';
* $result = rstrstr($haystack, '/')
* $result == this
*
* @access	public
* @param	string $haystack, string $needle
* @return	string
**/    

function rstrstr($haystack,$needle)
    {
        return substr($haystack, 0,strpos($haystack, $needle));
    }

?>